package algorithm;

import java.util.ArrayList;
import java.util.List;

public class test {


    public static void main(String[] args){
        List<String> arrys = new ArrayList<>();
        arrys.add("1");
        System.out.println(arrys.indexOf("1"));
        arrys.add("2");
        System.out.println(arrys.indexOf("2"));
        System.out.println(arrys.toArray());
        arrys.clear();
        System.out.println(arrys.size());
        Integer one = 1;
        Integer two=1;
        System.out.println(one.equals(two));

        //--- 测试unionFind----
        UnionFindService service = new UnionFindService(10,"2|3|4|6|3|5|1|6|7|2|6|3");
        service.getUnion();
        int idx = 0;
        for(int v:service.getId()){
            System.out.println("idx="+idx++ +" group="+v);
        }
        System.out.println(service.getCount());

    }
}
